import request from '@/plugins/request';

// 首页加载获取数据
export function getIndexPageData ({
    pageNum = 0,
    pageSize = 20,
    title = '',
    difficulty = '',
    reverse = false,
    passRate = false
} = {}) {
    return request.get('/problem/list', {
        params: { pageNum, pageSize, title, difficulty, reverse, passRate }
    })
}

export function getRandomProblem () {
    return request.get('problem/rand/0')
}
